package com.cskaoyan.com.generic.generic1;


public class Demo {
    public static void main(String[] args) {

//        MyDBLinkedList list = new MyDBLinkedList();
//        list.add(new User());
//        String o = (String) list.get(0); // 运行时错误
//
//
//        User user = new User();
//        Object obj = user;
//        String str = (String)obj;// 运行时错误


//        User user = new User();
//        String str = (String)user;// 编译时错误


//        MyDBLinkedList list2 = new MyDBLinkedList();
//        list2.add("zs");

        // 人的能力


        MyDBLinkedList<User> list = new MyDBLinkedList<>();
        list.add(new User("zs", 18));
        User user = list.get(0);


        MyDBLinkedList<String> list2 = new MyDBLinkedList<>();
        list2.add("zs");
        String str = list2.get(0);


    }
}
//class User{
//
//}
